package com.example.gmallsugar.service;

import com.example.gmallsugar.bean.Province;
import com.example.gmallsugar.bean.Spu;
import com.example.gmallsugar.bean.Tm;
import com.example.gmallsugar.mapper.TradeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author lzc
 * @Date 2023/5/6 10:34
 */
@Service
public class TradeServiceImpl implements TradeService{
    // 从 mapper 层读取数据
    @Autowired
    TradeMapper tradeMapper;
    @Override
    public BigDecimal gmv(Integer date) {
        return tradeMapper.gmv(date);
    }
    
    @Override
    public List<Spu> gmvBySpu(Integer date) {
        return tradeMapper.gmvBySpu(date);
    }
    
    @Override
    public List<Tm> gmvByTm(Integer date) {
        return tradeMapper.gmvByTm(date);
    }
    
    @Override
    public List<Province> province(Integer date) {
        return tradeMapper.province(date);
    }
    
}
